package com.AAL.Model;

import java.io.Serializable;
import javax.persistence.*;

import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the SourcingRequest database table.
 * 
 */
@Entity
public class SourcingRequest implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id	
	@Column(name="SourcingRequestID")
	private String sourcingRequestID;

    @Lob()
	@Column(name="Description")
	private String description;

	@Column(name="ProcessingDate")
	private Timestamp processingDate;

	@Column(name="RequestDate")
	private Timestamp requestDate;

	@Column(name="RequirementDate")
	private Timestamp requirementDate;

	//bi-directional many-to-one association to RequestingDetail
	@OneToMany(mappedBy="sourcingRequest", cascade={CascadeType.REMOVE, CascadeType.REFRESH})
	private List<RequestingDetail> requestingDetails;

	//bi-directional many-to-one association to Employee
	@ManyToOne(cascade={CascadeType.REFRESH})
	@JoinColumn(name="EmployeeID")
	private Employee employeeByHO;

	//bi-directional many-to-one association to Employee
	@ManyToOne(cascade={CascadeType.REFRESH})
	@JoinColumn(name="Coordinator")
	private Employee employeeByCoordinator;

	//bi-directional many-to-one association to StatusOfRequest
	@ManyToOne(cascade={CascadeType.REFRESH})
	@JoinColumn(name="StatusOfRequestID")
	private StatusOfRequest statusOfRequest;

    public SourcingRequest() {
    }

	public String getSourcingRequestID() {
		return this.sourcingRequestID;
	}

	public void setSourcingRequestID(String sourcingRequestID) {
		this.sourcingRequestID = sourcingRequestID;
	}

	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Timestamp getProcessingDate() {
		return this.processingDate;
	}

	public void setProcessingDate(Timestamp processingDate) {
		this.processingDate = processingDate;
	}

	public Timestamp getRequestDate() {
		return this.requestDate;
	}

	public void setRequestDate(Timestamp requestDate) {
		this.requestDate = requestDate;
	}

	public Timestamp getRequirementDate() {
		return this.requirementDate;
	}

	public void setRequirementDate(Timestamp requirementDate) {
		this.requirementDate = requirementDate;
	}

	public List<RequestingDetail> getRequestingDetails() {
		return this.requestingDetails;
	}

	public void setRequestingDetails(List<RequestingDetail> requestingDetails) {
		this.requestingDetails = requestingDetails;
	}
	
	public Employee getEmployeeByHO() {
		return this.employeeByHO;
	}

	public void setEmployeeByHO(Employee employeeByHO) {
		this.employeeByHO = employeeByHO;
	}
	
	public Employee getEmployeeByCoordinator() {
		return this.employeeByCoordinator;
	}

	public void setEmployeeByCoordinator(Employee employeeByCoordinator) {
		this.employeeByCoordinator = employeeByCoordinator;
	}
	
	public StatusOfRequest getStatusOfRequest() {
		return this.statusOfRequest;
	}

	public void setStatusOfRequest(StatusOfRequest statusOfRequest) {
		this.statusOfRequest = statusOfRequest;
	}
	
}